package com.kmxd.ams.infra.license.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 授权信息表
 *
 * @author ZuoLG
 * @since 2023-05-12
 */
@Data
@TableName("jy_conf_license")
public class ConfLicense implements Serializable {

  private static final long serialVersionUID = 1L;

  /** 主键ID */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long id;

  /** 全宗ID */
  @JsonSerialize(using = ToStringSerializer.class)
  private Long fondsId;

  /** 是否注册 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer regFlag;

  /** 注册类型 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer regType;

  /** 注册用户 */
  private String regUser;

  /** 注册码 */
  private String regCode;

  /** 注册日期 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date regTime;

  /** 版本 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer version;

  /** 授权期限 */
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date period;

  /** 限制公司数 */
  @JsonSerialize(using = ToStringSerializer.class)
  private Integer companyNum;

  /** 机器码 */
  private String computerCode;

  /** 创建人 */
  @TableField(fill = FieldFill.INSERT)
  private Long createBy;

  /** 创建时间 */
  @TableField(fill = FieldFill.INSERT)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date createTime;

  /** 更新人 */
  @TableField(fill = FieldFill.INSERT_UPDATE)
  private Long updateBy;

  /** 更新时间 */
  @TableField(fill = FieldFill.INSERT_UPDATE)
  @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date updateTime;
}
